package outputStream;

import java.io.Serializable;

/**
 * @author 培培
 * @condition 努力学习中
 */
//如果需要序列化某个类的对象，需要实现 Serializable
public class Dog implements Serializable {
    private  String name;
    private  int age;

    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
